srand time null 在 [問題] 關於srand(time(NULL))應用於多process - PTT數位生活區 的評價 #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<time.h> int main(){ int n1=0,n2=0; pid_t pid; pid=fork(); if(pid==0){ srand(time(NULL)); ... ... <看更多>